
import {request} from './request.js' //导入封装好的js文件

//登录  post请求
export const login = (code,nickname,avatarUrl)=>{
    return request({
        url:`/user/wxlogin?data=${code},${nickname},${avatarUrl}`,
        method:'get',
        header:{
        isToken: false,
        repeatSubmit: false
    }
    })
}

export const logout = ()=>{
    return request({
        url:`/user/logout`,
        method:'delete',
        header:{
            isToken: true,
            repeatSubmit: false
        }
    })
}

//用户信息  get请求
export const info = ()=>{
    return request({
        url:'/wx-api/me/info',
    })
}
